<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Mosaddek">
    <meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <link rel="shortcut icon" href="<?php echo base_url() ?>/Resources/Admin/img/favicon.png">

    
    <title>Show item</title>

    <!-- Bootstrap core CSS -->
    <link href="<?php echo base_url() ?>/Resources/Admin/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo base_url() ?>/Resources/Admin/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="<?php echo base_url() ?>/Resources/Admin/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />

    <link href="<?php echo base_url() ?>/Resources/Admin/assets/advanced-datatable/media/css/demo_page.css" rel="stylesheet" />
    <link href="<?php echo base_url() ?>/Resources/Admin/assets/advanced-datatable/media/css/demo_table.css" rel="stylesheet" />

    <script src='<?php echo base_url() ?>/Resources/Admin/multi/jquery2.js'></script>
    <script src='<?php echo base_url() ?>/Resources/Admin/multi/multifilter.js'></script>

    <!-- Custom styles for this template -->
    <link href="<?php echo base_url() ?>/Resources/Admin/css/style.css" rel="stylesheet">
    <link href="<?php echo base_url() ?>/Resources/Admin/css/style-responsive.css" rel="stylesheet" />

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
      <script src="js/respond.min.js"></script>
    <![endif]-->
  </head>
    
  <body>

  <section id="container" class="">
      <!--header start-->
      <header class="header white-bg">
      <?php $this->load->view('admin_layout/header') ?>
      </header>
      <!--header end-->
      <!--sidebar start-->
      <aside>
          <div id="sidebar"  class="nav-collapse ">
              <?php $this->load->view('admin_layout/sidebar') ?>
          </div>
      </aside>
  
      <!--sidebar end-->
      <!--main content start-->
      <section id="main-content">
          <section class="wrapper">
              <!-- page start-->
              <section class="panel">
                  <header class="panel-heading">
                      List item
                  </header>
                  <div class="panel-body">
              <div class="adv-table">
                            <table cellpadding="0" cellspacing="0" border="0" class="display table table-bordered table-striped" id="hidden-table-info">
                                <thead>
                                <tr>
                               <!--     <th>SET_ITEMS_NAME</th> -->
                                    <th>ITEM_NAME</th>
                                    <th class="hidden-phone">HERO_NAME</th>
                                    <th class="hidden-phone">ITEM_RARITY</th>
                                    <th class="hidden-phone">ADD_DATE</th>
                                    <th class="hidden-phone">PRICE_MARKET</th>
                                    <th class="hidden-phone">PRICE_NOW</th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php if(isset($list) && !empty($list))
                                { 
                                    $a=1;
                                    foreach($list as $i)
                                    {
                                    ?>
                                <tr class="gradeX">
                                <!--    <td><?php echo $i->SET_ITEMS_NAME; ?></td> -->
                                    <td><?php echo $i->ITEM_NAME; ?></td>
                                    <td class="hidden-phone"><?php echo $i->HERO_NAME; ?></td>
                                    <td class="center hidden-phone"><?php echo $i->ITEM_RARITY; ?></td>
                                    <td class="center hidden-phone"><?php echo $i->ADD_DATE; ?></td>
                                    <td class="hidden-phone"><?php echo $i->PRICE_MARKET; ?></td>
                                    
                                    <!-- modal update giá -->
                                    
                                    <td>
                                        <!-- Button trigger modal -->
                                                <button class="btn btn-info" data-toggle="modal" data-target="#editModal">
                                                  <i class="icon-refresh"></i> Cập nhật giá
                                                </button>
                                                
                                                <!-- Modal -->
                                                <div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel" aria-hidden="true">
                                                  <div class="modal-dialog">
                                                    <div class="modal-content">
                                                      <div class="modal-header">
                                                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                                        <h4 class="modal-title" id="editModalLabel">Cập nhật giá mới</h4>
                                                      </div>
                                                      <div class="modal-body">
                                                        ...
                                                      </div>
                                                      <div class="modal-footer">
                                                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                                                        <button type="button" id="submit" class="btn btn-primary">Save changes</button>
                                                      </div>
                                                    </div>
                                                  </div>
                                                </div>
                                    </td>
                                    
                                    <!-- kết thúc modal update giá -->
                                    
                                </tr>
                               <?php $a++; } } ?>
                                </tbody>
                            </table>

                        </div>
                  </div>
              </section>
              <!-- page end-->
          </section>
      </section>
      <!--main content end-->
      <!--footer start-->
      <footer class="site-footer">
          <?php $this->load->view('admin_layout/footer') ?>
      </footer>
      <!--footer end-->
  </section>

    <!-- js placed at the end of the document so the pages load faster -->
    <!--<script src="js/jquery.js"></script>-->
    <script type="text/javascript" language="javascript" src="<?php echo base_url() ?>/Resources/Admin/assets/advanced-datatable/media/js/jquery.js"></script>
    <script src="<?php echo base_url() ?>/Resources/Admin/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="<?php echo base_url() ?>/Resources/Admin/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="<?php echo base_url() ?>/Resources/Admin/js/jquery.scrollTo.min.js"></script>
    <script src="<?php echo base_url() ?>/Resources/Admin/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="<?php echo base_url() ?>/Resources/Admin/js/respond.min.js" ></script>
    <script type="text/javascript" language="javascript" src="<?php echo base_url() ?>/Resources/Admin/assets/advanced-datatable/media/js/jquery.dataTables.js"></script>


    <!--common script for all pages-->
    <script src="<?php echo base_url() ?>/Resources/Admin/js/common-scripts.js"></script>

    <script type="text/javascript">
      /* Formating function for row details */
      function fnFormatDetails ( oTable, nTr )
      {
          var aData = oTable.fnGetData( nTr );
          var sOut = '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">';
          sOut += '<tr><td>Rendering engine:</td><td>'+aData[1]+' '+aData[4]+'</td></tr>';
          sOut += '<tr><td>Link to source:</td><td>Could provide a link here</td></tr>';
          sOut += '<tr><td>Extra info:</td><td>And any further details here (images etc)</td></tr>';
          sOut += '</table>';

          return sOut;
      }

      $(document).ready(function() {
          /*
           * Insert a 'details' column to the table
           */ 
          var nCloneTh = document.createElement( 'th' );
          var nCloneTd = document.createElement( 'td' );
          nCloneTd.innerHTML = '<img src="<?php echo base_url() ?>/Resources/Admin/assets/advanced-datatable/examples/examples_support/details_open.png">';
          nCloneTd.className = "center";

          $('#hidden-table-info thead tr').each( function () {
              this.insertBefore( nCloneTh, this.childNodes[0] );
          } );

          $('#hidden-table-info tbody tr').each( function () {
              this.insertBefore(  nCloneTd.cloneNode( true ), this.childNodes[0] );
          } );
          
        

          /*
           * Initialse DataTables, with no sorting on the 'details' column
           */
          var oTable = $('#hidden-table-info').dataTable( {
              "aoColumnDefs": [
                  { "bSortable": false, "aTargets": [ 0 ] }
              ],
              "aaSorting": [[1, 'asc']]
          });

          /* Add event listener for opening and closing details
           * Note that the indicator for showing which row is open is not controlled by DataTables,
           * rather it is done here
           */
          $('#hidden-table-info tbody td img').live('click', function () {
              var nTr = $(this).parents('tr')[0];
              if ( oTable.fnIsOpen(nTr) )
              {
                  /* This row is already open - close it */
                  this.src = "<?php echo base_url() ?>/Resources/Admin/assets/advanced-datatable/examples/examples_support/details_open.png";
                  oTable.fnClose( nTr );
              }
              else
              {
                  /* Open this row */
                  this.src = "<?php echo base_url() ?>/Resources/Admin/assets/advanced-datatable/examples/examples_support/details_close.png";
                  oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
              }
          } );
      } );
  </script>
    <script type='text/javascript'>
        //<![CDATA[
          $(document).ready(function() {
            $('.filter').multifilter()
          })
        //]]>
      </script>

  </body>

</html>